<!DOCTYPE html>
<html>
<?php echo $this->fetch('head.html'); ?>
 
<body>
<div class="fullscreen">

<div class="topfixed">
      <div class="t_left"><a href="/index.php?m=job&a=my" class="goBack"><i class="back"></i></a></div>
      <div class="t_main">发布招聘</div>
   
    </div> 
 

<div class="paddingheight" style="height:50px;"></div>
    <form method="post" action="<?php echo $this->_var['appadmin']; ?>?m=job&a=save&ajax=1" id="upload_form" class="form-horizontal ">
    <input type="hidden" name="id" value="<?php echo $this->_var['data']['id']; ?>" />
    
      <div class="input-row">
             
            <input type="text" name="title"  class="txt"   id="title" value="<?php echo $this->_var['data']['title']; ?>" placeholder="请输标题"  >
        
        </div>    
        
        
        <div class="input-row">
            
             <select name="catid" class="txt">
        <option value="0">请选择分类</option>
        <?php $_from = $this->_var['cat_list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
                    <option value="<?php echo $this->_var['c']['catid']; ?>" <?php if ($this->_var['data']['catid'] == $this->_var['c']['catid'] || get ( 'catid' ) == $this->_var['c']['catid']): ?> selected="selected"<?php endif; ?>><?php echo $this->_var['c']['cname']; ?></option>
                    <?php $_from = $this->_var['c']['child']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c_2');if (count($_from)):
    foreach ($_from AS $this->_var['c_2']):
?>
                        <option value="<?php echo $this->_var['c_2']['catid']; ?>" <?php if ($this->_var['data']['catid'] == $this->_var['c_2']['catid'] || get ( 'catid' ) == $this->_var['c_2']['catid']): ?> selected="selected"<?php endif; ?> class="o_c_2">|__<?php echo $this->_var['c_2']['cname']; ?></option>
                        <?php $_from = $this->_var['c_2']['child']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c_3');if (count($_from)):
    foreach ($_from AS $this->_var['c_3']):
?>
                        <option value="<?php echo $this->_var['c_3']['catid']; ?>" <?php if ($this->_var['data']['catid'] == $this->_var['c_3']['catid'] || get ( 'catid' ) == $this->_var['c_3']['catid']): ?> selected="selected"<?php endif; ?> class="o_c_3"> |____<?php echo $this->_var['c_3']['cname']; ?></option>
                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </select>
             
        </div>
        
        <div class="input-row">
        	<label>薪酬(天)</label>
            <input type="text" name="money" value="<?php echo $this->_var['data']['money']; ?>">  
        </div>
     	
        <div class="input-row">
        		 
        <?php $this->assign("tc",M("options")->children("".$this->_var["city"]["pid"]."","sitearea",1)); ?>
    	<select name="cityid" class="txt">
    		<option value="0">请选择地区</option>
            <?php $_from = $this->_var['tc']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
            <option value="<?php echo $this->_var['c']['id']; ?>" <?php if ($this->_var['c']['id'] == $this->_var['data']['cityid']): ?> selected<?php endif; ?>><?php echo $this->_var['c']['title']; ?></option>
            <?php if ($this->_var['c']['child']): ?>
            <?php $_from = $this->_var['c']['child']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'cc');if (count($_from)):
    foreach ($_from AS $this->_var['cc']):
?>
            <option value="<?php echo $this->_var['cc']['id']; ?>" <?php if ($this->_var['cc']['id'] == $this->_var['data']['cityid']): ?> selected<?php endif; ?>>|--<?php echo $this->_var['cc']['title']; ?></option>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            <?php endif; ?>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
    	</select>
            </select>
        </div>
        
        <div class="input-row">
        	<label>详细地址</label>
        	<input type="text" name="address" value="<?php echo $this->_var['data']['address']; ?>" >
        </div>
        
        <div class="input-row">
        	<label>联系电话</label>
        	 <input type="text" name="telephone" value="<?php echo $this->_var['data']['telephone']; ?>" >
        </div>
        
        <div class="input-row">
        	<label>联系人</label>
        	 <input type="text" name="nickname" value="<?php echo $this->_var['data']['nickname']; ?>"  >
        </div>
        
        <div class="input-row">
        	<label>公司名称</label>
        	 <input type="text" name="company" value="<?php echo $this->_var['data']['company']; ?>" >
        </div>
        
        
        <div class="area-row">
             
            <div style="width:90%; margin:0 auto; margin-bottom:10px;">
            <script type="text/html" style="height:300px;" name="content" id="content"><?php echo $this->_var['data']['content']; ?></script>
            </div>
      </div>
            <div class="clearfix"></div>
        </div>  
     
    <div class="pd-5">
    
      <button type="button" name="button" id="post-submit" class="global_btn submit" value="">发布招聘</button>  
    </div>
    <div style="clear:both;"></div>
    </form>
    </div>
    <?php echo $this->fetch('footer.html'); ?>
</div>

<?php loadEditor();;?> 
<script>
var editor=UE.getEditor('content',options);
$(function(){
	$("#post-submit").on("click",function(){
		$.post($("#upload_form").attr("action"),$("#upload_form").serialize(),function(data){
	
			if(data.error){
				skyToast(data.message);
			}else{
				skyToast("发布成功");
				setTimeout(function(){
					goBack();
				},1000);
			}
		},"json");
	});
});
</script>

</body>
</html>